home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / mawk10.zip / FIN.H < prev    next >
C/C++ Source or Header  |  1991-10-05  |  2KB  |  65 lines

  1.  
  2. /********************************************
  3. fin.h
  4. copyright 1991, Michael D. Brennan
  5.  
  6. This is a source file for mawk, an implementation of
  7. the AWK programming language.
  8.  
  9. Mawk is distributed without warranty under the terms of
  10. the GNU General Public License, version 2, 1991.
  11. ********************************************/
  12.  
  13. /*$Log:    fin.h,v $
  14.  * Revision 3.3.1.1  91/09/14  17:23:24  brennan
  15.  * VERSION 1.0
  16.  * 
  17.  * Revision 3.3  91/08/13  06:51:31  brennan
  18.  * VERSION .9994
  19.  * 
  20.  * Revision 3.2  91/06/28  04:16:46  brennan
  21.  * VERSION 0.999
  22.  * 
  23.  * Revision 3.1  91/06/08  06:14:35  brennan
  24.  * VERSION 0.995
  25.  * 
  26.  * Revision 2.3  91/06/08  06:00:21  brennan
  27.  * changed how eof is marked on main_fin
  28.  * 
  29.  * Revision 2.2  91/05/30  09:04:47  brennan
  30.  * input buffer can grow dynamically
  31.  * 
  32.  * Revision 2.1  91/04/08  08:23:11  brennan
  33.  * VERSION 0.97
  34.  * 
  35. */
  36.  
  37. /* fin.h */
  38.  
  39. #ifndef  FIN_H
  40. #define  FIN_H
  41. /* structure to control input files */
  42.  
  43. typedef struct {
  44. int  fd ;
  45. FILE *fp ;   /* NULL unless interactive */
  46. char *buff ;
  47. char *buffp ;
  48. unsigned nbuffs ; /* sizeof *buff in BUFFSZs */
  49. int  flags ;
  50. }  FIN ;
  51.  
  52. #define  MAIN_FLAG    1   /* part of main input stream if on */
  53. #define  EOF_FLAG     2
  54.  
  55. FIN *  PROTO (FINdopen, (int, int) );
  56. FIN *  PROTO (FINopen, (char *, int) );
  57. void   PROTO (FINclose, (FIN *) ) ;
  58. char*  PROTO (FINgets, (FIN *, unsigned *) ) ;
  59. unsigned PROTO ( fillbuff, (int, char *, unsigned) ) ;
  60.  
  61.  
  62. extern  FIN  *main_fin ;  /* for the main input stream */
  63. void   PROTO( open_main, (void) ) ;
  64. #endif  /* FIN_H */
  65.